//package com.xuecheng.media.config.rocketmq;
//
//import lombok.Data;
//import org.apache.rocketmq.spring.annotation.RocketMQTransactionListener;
//import org.apache.rocketmq.spring.core.RocketMQLocalTransactionListener;
//import org.apache.rocketmq.spring.core.RocketMQLocalTransactionState;
//import org.springframework.messaging.Message;
//
//@RocketMQTransactionListener
//public class MediaTransactionListener implements RocketMQLocalTransactionListener {
//
//    @Override
//    public RocketMQLocalTransactionState executeLocalTransaction(Message msg, Object arg) {
//        // 执行本地事务逻辑
//        try {
//            // 业务处理...
//            return RocketMQLocalTransactionState.COMMIT;
//        } catch (Exception e) {
//            return RocketMQLocalTransactionState.ROLLBACK;
//        }
//    }
//
//    @Override
//    public RocketMQLocalTransactionState checkLocalTransaction(Message msg) {
//        // 检查本地事务状态
//        return RocketMQLocalTransactionState.COMMIT;
//    }
//}